<?php
$model = new BDynamicFormModel();
$model->addField('eventHome');
$model->addField('mobileTheme');
if (isset($eventRoleData)) {

    if (isset($eventRoleData['eventHome'])) {
        $model->eventHome = $eventRoleData['eventHome'];
    }
    if (isset($eventRoleData['mobileTheme'])) {
        $model->mobileTheme = $eventRoleData['mobileTheme'];
    }
}
$roleId = $eventRoleData['roleId'];
$eventCooker = new BAEventCooker();
$roleCooker = new BARoleCooker();
$role = $roleCooker->getRole($roleId);
$roleFullName = $role->getFullName();
$roleAlias = $roleCooker->getRoleAliasByFullName($roleFullName);
$event = $eventCooker->getCurrentEvent();
$eventHomeListData = $eventCooker->getEventHomeList($event);
$mobileThemeListData = array('0' => '没有模版', 'mb_bootstrap' => 'mobile bootstrap');
?>

<table class="table table-hover">
    <colgroup>
        <col class="span2">
        <col class="span6">
        <col class="span2">
    </colgroup>
    <thead>
        <tr>
            <th><?php echo '属性'; ?></th>
            <th><?php echo '内容'; ?></th>
        </tr>
    </thead>
    <tbody>
        <tr>
            <td>
                <?php echo '功能'; ?>
            </td>
            <td>
                <?php
                echo $event->getItem('name')->getValue();
                ?>
            </td>
        </tr>
        <tr>
            <td>
                <?php echo '角色'; ?>
            </td>
            <td>
                <?php
                echo $roleAlias;
                ?>
            </td>
        </tr>
        <tr>
            <td>
                <?php echo '功能主页'; ?>
            </td>
            <td>
                <?php
                echo CHtml::activeDropDownList($model, 'eventHome', $eventHomeListData, array('class' => ''));
                ?>
            </td>
        </tr>
        <tr>
            <td>
                <?php echo '手机模版'; ?>
            </td>
            <td>
                <?php
                echo CHtml::activeDropDownList($model, 'mobileTheme', $mobileThemeListData, array('class' => ''));
                ?>
            </td>
        </tr>  
    </tbody>
</table>

